package com.kintreda.ieco_server.module.place.service.impl;

import com.kintreda.ieco_server.bean.place.Place;
import com.kintreda.ieco_server.core.service.impl.BaseServiceImpl;
import com.kintreda.ieco_server.module.place.service.IPlaceService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Created by IntelliJ IDEA
 * @Project_Name ieco_server
 * @Package com.kintreda.ieco_server.module.place.service.impl
 * @Author ZhongYao_H
 * @Date 2019/5/8:9:36
 * @Year 2019 Month 05 Day 08
 * @Date_zh 2019 年 五月 星期三
 */
@Service
public class PlaceServiceImpl extends BaseServiceImpl<Place,String> implements IPlaceService {
    @Override
    public Place getPlaceByName(String name) {
        List<Place> query = query("from Place where name = ? ", new Object[]{name});
        return query.size()>0?query.get(0):null;
    }
}
